define('view/demo/index', ['restTemplate', 'text!./index.html'], function (restTemplate, template) {
  // console.log(template)

  return {
    template: template,
    data: function () {
      return {
        userinfo: {}
      }
    },
    methods: {
      toHome: function () {
        this.$router.push({path: '/'})
      }
    },
    created() {
      restTemplate.request({url:'ui/mockdata/user.json'}).then((data) => {
        this.userinfo = data
      })
    }
  }
})
